#!/bin/bash
which facter > /dev/null 2>&1
if [ $? == 0 ]; then
    fqdn=`facter fqdn`
    if [ "$HOSTNAME" != "$fqdn" ]; then
    HOSTNAME=$fqdn
    fi
fi